<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/base.js"></script>
    <script src="js/md5.js"></script>
</head>
<body>

<input type="text" id="signName" placeholder="用户名/手机号/邮箱地址"><br>
<input type="password" id="password" placeholder="密码"><br>
<button onclick=""></button>

<script>
    function onSignInClick() {
        //这里 user-service 的路径不对
        let url = "http://loaclhost:9001/qf/user/sinIn";
        let method = "POST";
        let json = {};
        //网络请求
        $.rest(url,method,json,function (r) {
            if (r.code==200) {
                //登陆成功
                let user = r.result.user;
                let token = r.result.token;
                localStorage.setItem("token", token);
                localStorage.setItem("userId", user.id);
                localStorage.setItem("username", user.username);
                localStorage.setItem("nickname", user.nickname);
                localStorage.setItem("gender", user.gender);
                localStorage.setItem("telephone", user.telephone);
                localStorage.setItem("email", user.email);
                localStorage.setItem("iconLink", user.iconLink);
                window.location.href("/AsyncView2.html");
            }
        });
    }
</script>
</body>
</html>